Skip to content

feat: add /remove-ai-slop command#10

Open
nyatinte wants to merge 2 commits intomainfrom
claude/remove-ai-slop-01NukTgtn2xn6r7BJmAGiqDQ
Open

feat: add /remove-ai-slop command#10
nyatinte wants to merge 2 commits intomainfrom
claude/remove-ai-slop-01NukTgtn2xn6r7BJmAGiqDQ

Conversation

@nyatinte
Copy link
Owner

@nyatinte nyatinte commented Dec 2, 2025

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @nyatinte, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new command, /remove-ai-slop, which aims to enhance code quality by providing a structured approach to identifying and removing AI-generated code that does not align with established coding standards or human-authored practices. The command's documentation outlines specific criteria for what constitutes 'slop' and guides users on how to report the resulting changes, thereby streamlining the refinement of AI-assisted code contributions.

Highlights

  • New Command Added: Introduced a new command, /remove-ai-slop, designed to help identify and remove AI-generated code inconsistencies.
  • AI Slop Definition: The command's documentation provides clear guidelines on what constitutes 'AI slop,' including extra comments, abnormal defensive checks, 'any' casts, and inconsistent styling.
  • Reporting Requirements: Users of the command are instructed to provide a concise 1-3 sentence summary of the changes made after execution.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new /remove-ai-slop command, which is a great utility for maintaining code quality when working with AI-generated code. My review includes a suggestion to add the necessary YAML frontmatter to make the command functional and to generalize the base branch logic, ensuring the command is robust and consistent with other commands in the repository.

Comment on lines +1 to +11
# Remove AI code slop

Check the diff against main, and remove all AI generated slop introduced in this branch.

This includes:
- Extra comments that a human wouldn't add or is inconsistent with the rest of the file
- Extra defensive checks or try/catch blocks that are abnormal for that area of the codebase (especially if called by trusted / validated codepaths)
- Casts to any to get around type issues
- Any other style that is inconsistent with the file

Report at the end with only a 1-3 sentence summary of what you changed

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The command definition is missing the YAML frontmatter block, which is essential for configuring the command's behavior, permissions, and description. Other commands in this repository use it to specify allowed-tools, denied-tools, model, etc. Without this, the command is likely non-functional.

Additionally, the instruction to Check the diff against main is too specific. The base branch for a feature is often develop or another branch, not always main. It's better to use a more generic term like "the base branch" to make the command more versatile.

I've provided a suggestion that adds a suitable frontmatter and generalizes the base branch instruction.

Suggested change
# Remove AI code slop
Check the diff against main, and remove all AI generated slop introduced in this branch.
This includes:
- Extra comments that a human wouldn't add or is inconsistent with the rest of the file
- Extra defensive checks or try/catch blocks that are abnormal for that area of the codebase (especially if called by trusted / validated codepaths)
- Casts to any to get around type issues
- Any other style that is inconsistent with the file
Report at the end with only a 1-3 sentence summary of what you changed
---
description: "Remove AI-generated code slop from the current branch"
allowed-tools: Read(*), Edit(*), Bash(git diff:*), Bash(git branch --show-current)
denied-tools: Bash(git commit:*), Bash(git push:*)
model: sonnet
---
# Remove AI code slop
Check the diff against the base branch, and remove all AI generated slop introduced in this branch.
This includes:
- Extra comments that a human wouldn't add or is inconsistent with the rest of the file
- Extra defensive checks or try/catch blocks that are abnormal for that area of the codebase (especially if called by trusted / validated codepaths)
- Casts to any to get around type issues
- Any other style that is inconsistent with the file
Report at the end with only a 1-3 sentence summary of what you changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants